<?php
defined('IN_MAIN') or exit('Invalid Access!');

function initialize(){
//connect db
global $vars;
if(!$db_link=@mysql_connect ($vars['dbi']['host'], $vars['dbi']['user'], $vars['dbi']['pass'])){
 print format_error_page(format_err('Unable to connect to the Database.<br /><br />'.mysql_error()));
 exit();
}elseif(!@mysql_select_db ($vars['dbi']['name'])){
 print format_error_page(format_err('Unable to connect to the Database.<br /><br />'.mysql_error()));
 exit();
}
}

function cron_initialize(){
//connect db
global $vars;
if(!$db_link=@mysql_connect ($vars['dbi']['host'], $vars['dbi']['user'], $vars['dbi']['pass'])){
 return 'Unable to connect to the Database.';
}elseif(!@mysql_select_db ($vars['dbi']['name'])){
 return 'Unable to connect to the Database.';
}else{
 return true;
}
}
?>